package cn.kai.org.domain;

import java.math.BigDecimal;
import java.util.Date;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.kai.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author kai
 * @since 2022-06-12
 */
@Data
public class Shop extends BaseDomain{

    private static final long serialVersionUID = 1L;

    @Excel(name = "店铺名字" ,orderNum = "1", width = 30, isImportField = "true_st")
    private String name;
    @Excel(name = "联系电话" ,orderNum = "2", width = 30, isImportField = "true_st")
    private String tel;

    // 此注解是从后端往前端：专门格式化JSON数据的时间字段
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    // 此注解是从前端往后端传递数据的时候，格式化前端传递到后端的时间字段格式
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Excel(name = "注册时间" ,orderNum = "3", width = 30, isImportField = "true_st",exportFormat="yyyy-MM-dd",importFormat = "yyyy-MM-dd")
    private Date registerTime = new Date();
    /**
     * 0=待审核 1=审核通过 -1=驳回 2=待激活
     */
    @Excel(name = "状态" ,orderNum = "4", width = 30, isImportField = "true_st",replace = {"待审核_0","审核通过_1","驳回_-1","待激活_2"})
    private Integer state = 0;
    @Excel(name = "地址" ,orderNum = "5", width = 30, isImportField = "true_st")
    private String address;
    @Excel(name = "店招" ,orderNum = "6", width = 30, isImportField = "true_st")
    private String logo;

    private Long adminId;

    private Employee admin;


}
